package app.serialport;

import app.serialport.ByteUtil;

public class FixedLengthDecoder implements Decoder {
	
	private int length;
	
	public FixedLengthDecoder(int length) {
		this.length = length;
	}
	
	@Override
	public byte[] decode(byte[] data) {
		if(data.length < length) {
			return null;
		}
		
		return data;
	}
}
